<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
    .prtext {
    color: #000000;
    font-family: tahoma;
    font-size: 11px;
    }
    .prhead {
    color: #000000;
    font-family: arial;
    font-size: 14px;
    }
    .prhead_tnr {
    color: #000000;
    font-family: Times New Roman;
    }
    .prtext_blacksmall {
	font-size: 11px;
	color: #00000;
	font-family: tahoma;
    }
    .prtitle {
	font-size: 18px;
	color: #000000;
	font-family: tahoma;
	font-weight: bold;
    }
    </style>
<title><?php echo $title;?></title>
<link type="text/css" href="<?php echo site_url('css_print/main.css') ?>" rel="stylesheet"/>
</head>
<body onload="window.print();">
<table width="700" cellspacing="0" cellpadding="0" border="0" align="center">
    <tbody>
      <tr>
       <td class="prtext">
        <table cellspacing="0" cellpadding="0" border="0">
          <tbody>
           <tr>
            <td width="90" valign="top"><img src="<?php echo site_url('images/r4.jpg') ?>" width="110px"></td>
            <td width="710" valign="top" class="prhead_tnr" align="left">
              <div align="center" style="font-size: 20px; margin-left: 5px; margin-top: 15px"><b>KEMENTERIAN AGAMA</b></div>
              <div align="center" style="font-size: 22px; margin-left: 5px; margin-top: 5px"><b>INSTITUT AGAMA ISLAM NEGERI (IAIN) MATARAM</b></div>
              <div align="center" style="font-size: 16px; margin-left: 5px; margin-top: 5px">Jalan Pendidikan No. 35 Telp. (0370) 621298 - 625337 - Fax. 625337</div>
              <br>
            </td>
           </tr>
           <tr>
            <td colspan="2"><hr color="#000000" size="5" /></td>
           </tr>
          </tbody>
        </table>
        </td>
        </tr>
        </tbody>
        </table>


<div class="text">
<br />
<div align="center">
   <div class="data_mhs">
   <table border="1" cellspacing="0" cellpadding="5">
     <tr align="center">
       <td width="600" style="font-family: Arial;font-weight: bold;font-size: 150%; border-collapse: collapse">KARTU HASIL STUDI MAHASISWA</td>
     </tr>
   </table>  <br />
      <table align="center" width="800" border="0" cellspacing="0" cellpadding="3" style="font-family: Arial;font-size: 80%;">
  <tr>
    <td width="20%">NIM</td>
    <td width="30%">:&nbsp;&nbsp;<?php echo $dataMhs->NIM?></td>
	<td width="20%">Program Studi</td>
    <td width="30%">:&nbsp;&nbsp;<?php echo $dataprodi->NAMA_PRODI?></td>
  </tr>
  <tr>
    <td>Nama</td>
    <td>:&nbsp;&nbsp;<?php echo $dataMhs->NAMA ?></td>
	<td>Semester</td>
    <td>:&nbsp;&nbsp;<?php if($info_semester==1) echo "Ganjil"; else if($info_semester==2) echo "Genap"; else echo "KAS"?></td>
  </tr>
  <tr>
    <td>Tempat, tanggal lahir</td>
    <td>:&nbsp;&nbsp;<?php echo ucwords(strtolower($dataMhs->TEMPAT_LAHIR));?>, <?php $tgl1=$dataMhs->TANGGAL_LAHIR; echo $this->date_converter->converter_to_indonesian_date($tgl1); ?></td>
    <td>Tahun Akademik</td>
    <td>:&nbsp;&nbsp;<?php echo $info_tahun." / ".($info_tahun+1); ?></td>
  </tr>
  <tr>
	<td>IP semester</td>
    <td>:&nbsp;&nbsp;
    <?php if($khs) {
    $ips=$this->gpa_com->ips($khs,'NILAI','SKS');
    echo $ips;
    } else echo "0.00";?></td>
    <td>IPK</td>
	<td>:&nbsp;&nbsp;<?php echo $this->gpa_com->ipk_processor_sirak($dataMhs->NIM) ?></td>
  </tr>
</table>
     <br /><table width="800" style="border-collapse: collapse;font-size: 10pt;" border="1" cellspacing="0">
        <tbody align="center" style="font-family: Arial;">
        <tr style="font-weight: bold;font-size: 11pt">
            <td style="border: solid 1.5pt black" width="40" rowspan="3" align="center">No.</td>
            <td style="border: solid 1.5pt black" colspan="4">P R O G R A M</td>
            <td style="border: solid 1.5pt black" colspan="3">HASIL STUDI</td>
        </tr>
        <tr style="font-weight: bold;font-size: 11pt">
            <td style="border: solid 1.5pt black" rowspan="2" width="350">Mata Kuliah</td>
            <td style="border: solid 1.5pt black" rowspan="2" width="100">Kode MK</td>
            <td style="border: solid 1.5pt black" rowspan="2" width="50">SKS</td>
            <td style="border: solid 1.5pt black" rowspan="2" width="50" >Kelas</td>
            <td style="border: solid 1.5pt black" colspan="2">Nilai</td>
            <td style="border: solid 1.5pt black" rowspan="2">N x SKS</td>
        </tr>
        <tr style="font-weight: bold;font-size: 11pt">
            <td style="border: solid 1.5pt black">Angka</td>
            <td style="border: solid 1.5pt black">Huruf</td>
        </tr>
        <?php if($khs): ?>
        <?php
         $seq=1;
        $na=0;
        $sks=0;
        foreach($khs as $dataKhs):?>
        <tr height="25">
            <td style="border: solid 1.5pt black"><?php echo $seq;?></td>
            <td align="left"  style="border: solid 1.5pt black;border-left: none"><?php echo $dataKhs->NAMA_MK;?></td>
            <td style="border: solid 1.5pt black"><?php echo $dataKhs->KODE_MK;?></td>
            <td style="border: solid 1.5pt black"><?php echo $dataKhs->SKS;?></td>
            <td style="border: solid 1.5pt black"><?php echo $dataKhs->KELAS;?></td>
            <td style="border: solid 1.5pt black"><?php echo $dataKhs->BOBOT;?></td>
            <td style="border: solid 1.5pt black"><?php echo $dataKhs->NILAI;?></td>
            <td style="border: solid 1.5pt black"><?php echo ($dataKhs->BOBOT)*($dataKhs->SKS);?></td>
        </tr>
         <?php $seq++;
         $sks=$sks+($dataKhs->SKS);
         $na=$na+(($dataKhs->BOBOT)*($dataKhs->SKS));
         endforeach;
        ?>
        <tr>
            <td colspan="3" style="border: 1px solid #FFFFFF; border-top: 1px solid #000000; border-right: 1px solid #000000" >&nbsp;</td>
            <td style="border: solid 1.5pt black"><?php echo $sks;?></td>
            <td style="border: 1px solid #FFFFFF; border-top: 1px solid #000000; border-right: 1px solid #000000" colspan="2">&nbsp;</td>
            <td style="border: solid 1.5pt black">Jumlah</td>
            <td style="border: solid 1.5pt black"><?php echo $na;?></td>
        </tr>
        <tr>
            <td colspan="6" style="border: 1px solid #FFFFFF; border-top: 1px solid #000000; border-right: 1px solid #000000" >&nbsp;</td>
            <td style="border: solid 1.5pt black">I.P</td>
            <td style="border: solid 1.5pt black"><?php echo number_format($na/$sks,2);?></td>
        </tr>
        <?php else: ?>
        <tr><td colspan="8" style="border: solid 1.5pt black" align="left">Data tidak tersedia</td></tr>
        <?php endif; ?>
        </tbody>
     </table>
      <?php if($dataMhs == NULL): ?>
     <div style="width:500px">
          <div id="p_messages_error">
           Maaf, data tidak tersedia.
          </div>
      </div>
     <?php
     endif; ?>

   </div>
</div>
</div>
</body>
</html>